package com.zelix;

import javax.swing.*;
import java.awt.*;
import java.lang.reflect.InvocationTargetException;

public class f2 extends d2 {

    JButton a;
    JLabel b;
    FontMetrics c;
    private static String z[];

    public f2(Frame frame, String s, String s1) {
        super(frame, s, true);
        boolean flag = g2.b;
        Container container = getContentPane();
        container.setLayout(new BorderLayout());
        b = new JLabel(s1, 0);
        container.add(b, z[3]);
        a = new JButton(z[2]);
        container.add(a, z[1]);
        if (frame == null)
            setFont(new Font(z[0], 0, 12));
        c = b.getFontMetrics(b.getFont());
        int i = c.stringWidth(s1);
        int j = (int) Math.max(100D, (double) i * 1.2D);
        setSize(j, 100);
        hb hb1 = new hb(this);
        addWindowListener(hb1);
        p p1 = new p(this);
        a.addKeyListener(p1);
        zy zy1 = new zy(this);
        a.addActionListener(zy1);
        Dimension dimension = getSize();
        Point point = frame.getLocationOnScreen();
        Dimension dimension1 = frame.getSize();
        int k = (dimension1.width / 2 - dimension.width / 2) + point.x;
        int l = (dimension1.height / 2 - dimension.height / 2) + point.y;
        k = Math.max(0, k);
        l = Math.max(0, l);
        setLocation(k, l);
        c();
        zz.a(this, true);
        if (gs.b != 0)
            g2.b = !flag;
    }

    public void a() {
        setVisible(false);
        dispose();
    }

    public static void a(Frame frame, String s, String s1) {
        a(frame, s, s1, false);
    }

    public static void a(Frame frame, String s, String s1, boolean flag) {
        az az1 = new az(frame, s1, s);
        if (flag) {
            if (!SwingUtilities.isEventDispatchThread()) {
                try {
                    SwingUtilities.invokeAndWait(az1);
                }
                catch (InterruptedException interruptedexception) {
                    interruptedexception.printStackTrace();
                }
                catch (InvocationTargetException invocationtargetexception) {
                    invocationtargetexception.getTargetException().printStackTrace();
                    invocationtargetexception.printStackTrace();
                }
            } else {
                new f2(frame, s, s1);
            }
        } else {
            SwingUtilities.invokeLater(az1);
        }
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0x31;
                    break;
                case 1:
                    key = 25;
                    break;
                case 2:
                    key = 31;
                    break;
                case 3:
                    key = 51;
                    break;
                case 4:
                    key = 111;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[4];
        as[0] = z("up~_\000V".toCharArray());
        as[1] = z("bvjG\007".toCharArray());
        as[2] = z("~R".toCharArray());
        as[3] = z("r|qG\nC".toCharArray());
        z = as;

    }
}